<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--
  Created by IntelliJ IDEA.
  User: seal
  Date: 2019/6/19
  Time: 17:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<table>
    <tr>
        <th>
            学号
        </th>
        <th>姓名</th>
        <th>性别</th>
        <th>生日</th>
        <th>操作</th>
    </tr>
    <c:forEach var="student" items="${pagination.result}">
    <%--<c:forEach var="student" items="${students}">--%>
        <tr>
            <td>${student.id}</td>
            <td>${student.name}</td>
            <td>${student.gender}</td>
            <td><fmt:formatDate value="${student.bornday}" pattern="yyyy年MM月dd日"></fmt:formatDate> </td>
            <td><a href="show?id=${student.id}">查看</a> | <a href="add?id=${student.id}">编辑</a>|<a href="delete?id=${student.id}">删除</a> </td>
        </tr>
    </c:forEach>
</table>

<c:if test="${not pagination.firstPage}">
<a href="list?currentPageIndex=1">首页</a>
<a href="list?currentPageIndex=${pagination.currentPageIndex -1 }">上页</a>
</c:if>

<c:if test="${not pagination.lastPage}">
<a href="list?currentPageIndex=${pagination.currentPageIndex +1 }">下页</a>
<a href="list?currentPageIndex=${pagination.totalPageCount }">尾页</a>
</c:if>

当前是第${pagination.currentPageIndex}页，共有${pagination.totalPageCount}页，每页显示${pagination.pageSize}行,目前从${pagination.firstRecordNo}~${pagination.lastRecordNo}，go<input>页

</body>
</html>
